<!doctype html>
<html class="no-js" lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>Companion</title>
<link href="../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../../";</script>
    <script>document.documentElement.classList.replace("no-js", "js");</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
      if (storage == null) {
        const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
        if (osDarkSchemePreferred === true) {
          document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
      } else {
        const savedDarkMode = JSON.parse(storage)
        if (savedDarkMode === true) {
          document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
      }
    </script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async></script>
<script type="text/javascript" src="../../../../scripts/sourceset_dependencies.js" async></script>
<link href="../../../../styles/style.css" rel="Stylesheet">
<link href="../../../../styles/main.css" rel="Stylesheet">
<link href="../../../../styles/prism.css" rel="Stylesheet">
<link href="../../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../../ui-kit/ui-kit.min.css" rel="Stylesheet">
<script type="text/javascript" src="../../../../scripts/safe-local-storage_blocking.js"></script>
<script type="text/javascript" src="../../../../scripts/navigation-loader.js" async></script>
<script type="text/javascript" src="../../../../scripts/platform-content-handler.js" async></script>
<script type="text/javascript" src="../../../../scripts/main.js" defer></script>
<script type="text/javascript" src="../../../../scripts/prism.js" async></script>
<script type="text/javascript" src="../../../../ui-kit/ui-kit.min.js" defer></script></head>
<body>
<div class="root">
    <header class="navigation theme-dark" id="navigation-wrapper" role="banner">
<a class="library-name--link" href="../../../../index.html" tabindex="1">
                    exposed
            </a>        <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
        </button>
        <div class="navigation-controls--break ui-kit_mobile-only"></div>
        <div class="library-version" id="library-version">1.0.0-rc-4
        </div>
        <div class="navigation-controls">
        <ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
                <button class="platform-tag platform-selector jvm-like" data-active="" aria-pressed="true" data-filter=":exposed-jdbc/main">jvm</button>
            <div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
                <button class="button button_dropdown filter-section--dropdown-toggle" role="combobox" data-role="dropdown-toggle" aria-controls="platform-tags-listbox" aria-haspopup="listbox" aria-expanded="false" aria-label="Toggle source sets"></button>
                <ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox" aria-label="Target filter">
                    <div class="dropdown--header"><span>Target filter</span>
                        <button class="button" data-role="dropdown-toggle" aria-label="Close target filter">
                            <i class="ui-kit-icon ui-kit-icon_cross"></i>
                        </button>
                    </div>
                        <li role="option" class="dropdown--option platform-selector-option jvm-like" tabindex="0">
                            <label class="checkbox">
                                <input type="checkbox" class="checkbox--input" id=":exposed-jdbc/main" data-filter=":exposed-jdbc/main">
                                <span class="checkbox--icon"></span>
                                jvm
                            </label>
                        </li>
                </ul>
                <div class="dropdown--overlay"></div>
            </div>
        </ul>
            <button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button" type="button">Switch theme
            </button>
            <div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
                API
            </div>
        </div>
    </header>
    <div id="container">
        <nav id="leftColumn" class="sidebar" data-item-type="SECTION" data-item-config="{&quot;defaultSize&quot;: 280, &quot;minSize&quot;: 200, &quot;maxSize&quot;: 400}">
            <a class="toc--skip-link" href="#main">Skip to content</a>
            <div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
                <ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list" data-role="dropdown-listbox" aria-label="Table of contents">
                    <div class="dropdown--header">
                            <span>
                                    exposed
                            </span>
                        <button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
                            <i class="ui-kit-icon ui-kit-icon_cross"></i>
                        </button>
                    </div>
                    <div class="sidebar--inner" id="sideMenu"></div>
                </ul>
                <div class="dropdown--overlay"></div>
            </div>
        </nav>
        <div id="resizer" class="resizer" data-item-type="BAR"></div>
        <div id="main" data-item-type="SECTION" role="main">
<div class="main-content" data-page-type="classlike" id="content" pageids="exposed-jdbc::org.jetbrains.exposed.v1.jdbc/Database.Companion///PointingToDeclaration//-1624674168">
  <div class="breadcrumbs"><a href="../../../index.html">exposed-jdbc</a><span class="delimiter">/</span><a href="../../index.html">org.jetbrains.exposed.v1.jdbc</a><span class="delimiter">/</span><a href="../index.html">Database</a><span class="delimiter">/</span><span class="current">Companion</span></div>
  <div class="cover ">
    <h1 class="cover"><span><span>Companion</span></span></h1>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-jdbc/main"><div class="symbol monospace"><span class="token keyword">object </span><a href="index.html">Companion</a></div></div></div>
  </div>
  <div class="tabbedcontent">
    <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION">Members</button></div>
    <div class="tabs-section-body">
      <div data-togglable="FUNCTION">
        <h2 class="tableheader">Functions</h2>
        <div class="table"><a data-name="68715292%2FFunctions%2F-1624674168" anchor-label="connect" id="68715292%2FFunctions%2F-1624674168" data-filterable-set=":exposed-jdbc/main"></a>
          <div class="table-row table-row_content" data-filterable-current=":exposed-jdbc/main" data-filterable-set=":exposed-jdbc/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="connect.html"><span><span>connect</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="68715292%2FFunctions%2F-1624674168"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-jdbc/main"><div class="symbol monospace"><span class="token keyword">fun </span><a href="connect.html"><span class="token function">connect</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">getNewConnection<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/Connection.html">Connection</a><span class="token punctuation">, </span></span><span class="parameter ">databaseConfig<span class="token operator">: </span><a href="../../../../exposed-core/org.jetbrains.exposed.v1.core/-database-config/index.html">DatabaseConfig</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">connectionAutoRegistration<span class="token operator">: </span><a href="../../-database-connection-auto-registration/index.html">DatabaseConnectionAutoRegistration</a><span class="token operator"> = </span>connectionInstanceImpl<span class="token punctuation">, </span></span><span class="parameter ">manager<span class="token operator">: </span><span class="token punctuation">(</span><a href="../index.html">Database</a><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="../../../../exposed-core/org.jetbrains.exposed.v1.core.transactions/-transaction-manager-api/index.html">TransactionManagerApi</a><span class="token operator"> = </span>{ TransactionManager(it) }</span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">Database</a></div><div class="symbol monospace"><span class="token keyword">fun </span><a href="connect.html"><span class="token function">connect</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">datasource<span class="token operator">: </span><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/javax/sql/DataSource.html">DataSource</a><span class="token punctuation">, </span></span><span class="parameter ">setupConnection<span class="token operator">: </span><span class="token punctuation">(</span><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/Connection.html">Connection</a><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html">Unit</a><span class="token operator"> = </span>{}<span class="token punctuation">, </span></span><span class="parameter ">databaseConfig<span class="token operator">: </span><a href="../../../../exposed-core/org.jetbrains.exposed.v1.core/-database-config/index.html">DatabaseConfig</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">connectionAutoRegistration<span class="token operator">: </span><a href="../../-database-connection-auto-registration/index.html">DatabaseConnectionAutoRegistration</a><span class="token operator"> = </span>connectionInstanceImpl<span class="token punctuation">, </span></span><span class="parameter ">manager<span class="token operator">: </span><span class="token punctuation">(</span><a href="../index.html">Database</a><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="../../../../exposed-core/org.jetbrains.exposed.v1.core.transactions/-transaction-manager-api/index.html">TransactionManagerApi</a><span class="token operator"> = </span>{ TransactionManager(it) }</span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">Database</a></div><div class="symbol monospace"><span class="token keyword">fun </span><a href="connect.html"><span class="token function">connect</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">url<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token punctuation">, </span></span><span class="parameter ">driver<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator"> = </span>getDriver(url)<span class="token punctuation">, </span></span><span class="parameter ">user<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator"> = </span><span class="token string">""</span><span class="token punctuation">, </span></span><span class="parameter ">password<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator"> = </span><span class="token string">""</span><span class="token punctuation">, </span></span><span class="parameter ">setupConnection<span class="token operator">: </span><span class="token punctuation">(</span><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/Connection.html">Connection</a><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html">Unit</a><span class="token operator"> = </span>{}<span class="token punctuation">, </span></span><span class="parameter ">databaseConfig<span class="token operator">: </span><a href="../../../../exposed-core/org.jetbrains.exposed.v1.core/-database-config/index.html">DatabaseConfig</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">connectionAutoRegistration<span class="token operator">: </span><a href="../../-database-connection-auto-registration/index.html">DatabaseConnectionAutoRegistration</a><span class="token operator"> = </span>connectionInstanceImpl<span class="token punctuation">, </span></span><span class="parameter ">manager<span class="token operator">: </span><span class="token punctuation">(</span><a href="../index.html">Database</a><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="../../../../exposed-core/org.jetbrains.exposed.v1.core.transactions/-transaction-manager-api/index.html">TransactionManagerApi</a><span class="token operator"> = </span>{ TransactionManager(it) }</span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">Database</a></div><div class="brief "><p class="paragraph">Creates a <a href="../index.html">Database</a> instance.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-1556556436%2FFunctions%2F-1624674168" anchor-label="getDefaultIsolationLevel" id="-1556556436%2FFunctions%2F-1624674168" data-filterable-set=":exposed-jdbc/main"></a>
          <div class="table-row table-row_content" data-filterable-current=":exposed-jdbc/main" data-filterable-set=":exposed-jdbc/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="get-default-isolation-level.html"><span>get</span><wbr><span>Default</span><wbr><span>Isolation</span><wbr><span><span>Level</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1556556436%2FFunctions%2F-1624674168"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-jdbc/main"><div class="symbol monospace"><span class="token keyword">fun </span><a href="get-default-isolation-level.html"><span class="token function">getDefaultIsolationLevel</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">db<span class="token operator">: </span><a href="../index.html">Database</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a></div><div class="brief "><p class="paragraph">Returns the stored default transaction isolation level for a specific database.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-178172665%2FFunctions%2F-1624674168" anchor-label="getDialectName" id="-178172665%2FFunctions%2F-1624674168" data-filterable-set=":exposed-jdbc/main"></a>
          <div class="table-row table-row_content" data-filterable-current=":exposed-jdbc/main" data-filterable-set=":exposed-jdbc/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="get-dialect-name.html"><span>get</span><wbr><span>Dialect</span><wbr><span><span>Name</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-178172665%2FFunctions%2F-1624674168"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-jdbc/main"><div class="symbol monospace"><span class="token keyword">fun </span><a href="get-dialect-name.html"><span class="token function">getDialectName</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">url<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span></div><div class="brief "><p class="paragraph">Returns the database name used internally for the provided connection <a href="get-dialect-name.html">url</a>.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1705406545%2FFunctions%2F-1624674168" anchor-label="registerDialectMetadata" id="1705406545%2FFunctions%2F-1624674168" data-filterable-set=":exposed-jdbc/main"></a>
          <div class="table-row table-row_content" data-filterable-current=":exposed-jdbc/main" data-filterable-set=":exposed-jdbc/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="register-dialect-metadata.html"><span>register</span><wbr><span>Dialect</span><wbr><span><span>Metadata</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1705406545%2FFunctions%2F-1624674168"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-jdbc/main"><div class="symbol monospace"><span class="token keyword">fun </span><a href="register-dialect-metadata.html"><span class="token function">registerDialectMetadata</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">prefix<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token punctuation">, </span></span><span class="parameter ">metadata<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="../../../org.jetbrains.exposed.v1.jdbc.vendors/-database-dialect-metadata/index.html">DatabaseDialectMetadata</a></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Registers a new <a href="../../../org.jetbrains.exposed.v1.jdbc.vendors/-database-dialect-metadata/index.html">DatabaseDialectMetadata</a> with the identifier <a href="register-dialect-metadata.html">prefix</a>.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-860202564%2FFunctions%2F-1624674168" anchor-label="registerJdbcDriver" id="-860202564%2FFunctions%2F-1624674168" data-filterable-set=":exposed-jdbc/main"></a>
          <div class="table-row table-row_content" data-filterable-current=":exposed-jdbc/main" data-filterable-set=":exposed-jdbc/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="register-jdbc-driver.html"><span>register</span><wbr><span>Jdbc</span><wbr><span><span>Driver</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-860202564%2FFunctions%2F-1624674168"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":exposed-jdbc/main"><div class="symbol monospace"><span class="token keyword">fun </span><a href="register-jdbc-driver.html"><span class="token function">registerJdbcDriver</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">prefix<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token punctuation">, </span></span><span class="parameter ">driverClassName<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token punctuation">, </span></span><span class="parameter ">dialect<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Registers a new JDBC driver, using the specified <a href="register-jdbc-driver.html">driverClassName</a>, with the identifier <a href="register-jdbc-driver.html">prefix</a>.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
    <div class="footer">
        <div class="footer--container">
            <a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
            <div class="footer--content">
                <div>
                    <span>Generated by </span>
                    <a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
                        Dokka
                    </a>
                    <div>© 2025 Copyright</div>
                </div>
            </div>
        </div>
    </div>
        </div>
    </div>
</div>
</body>
</html>